#ifndef NETDEVICE_H
#define NETDEVICE_H

#include <string>
#include <cstring>

#include "readConig.h"
#include "wifiDevice.h"
#include "zigbeeDevice.h"
#include "thread.h"

using namespace std;

const string defaultDevice = "wifi";

class netDevice : public Thread
{
	Config *configSettings;
	string	deviceName;
	//int *ppMap;
	void *device;
	Thread *readThread;
	int	listen_sockfd;

public:
	netDevice();
	~netDevice();
	string changeDeviceTo(string newDeviceName);
	string getDeviceName() const;
	int sendMessage(int nodeID, char* buff, int buffSize);
	void run();
};

#endif //NETDEVICE_H
